The invention applies to a mode of coding where a current block of pixels is encoded using a block of indexes, the latter being built from a so-called palette.
A palette in this document is defined as a look up table having entries associating an index with a value of a pixel. Typically, but not necessary, the value of a pixel is constituted by the value of each colour component associated with the pixel, resulting in a colour palette. On the other hand, the value of a pixel may be made of a single pixel component, resulting in a monochrome palette.
This mode of encoding a block of pixel is generally referred to as Palette coding mode. It was contemplated to adopt this mode, for example, in the Range Extension of the High Efficiency Video Coding (HEVC: ISO/IEC 23008-2 MPEG-H Part 2/ITU-T H.265) international standard. This mode is now under consideration in the draft specification of the Screen Content Coding (SCC) extension of HEVC.
When encoding an image in a video sequence, the image is first divided into coding entities of pixels of equal size referred to as Coding Tree Block (CTB). The size of a Coding Tree Block is typically 64 by 64 pixels. Each Coding Tree Block may then be broken down into a hierarchical tree of smaller blocks which size may vary and which are the actual blocks of pixels to encode. These smaller blocks to encode are referred to as Coding Unit (CU).
The encoding of a particular Coding Unit is typically predictive. This means that a predictor block is first determined. Next, the difference between the predictor block and the Coding Unit is calculated. This difference is called the residual or residual block. Next, this residual is compressed. The actual encoded information of the Coding Unit is made of some information to indicate the way of determining the predictor block and the compressed residual. Best predictor blocks are blocks as similar as possible to the Coding Unit in order to get a small residual that could be efficiently compressed.
The coding mode is defined based on the method used to determine the predictor block for the predictive encoding method of a Coding Unit.
A first coding mode is referred to as INTRA mode. According to INTRA mode, the predictor block is built based on the value of pixels immediately surrounding the Coding Unit within the current image. It is worth noting that the predictor block is not a block of the current image but a construction. A direction is used to determine which pixels of the border are actually used to build the predictor block and how they are used. The idea behind INTRA mode is that, due to the general coherence of natural images, the pixels immediately surrounding the Coding Unit are likely to be similar to pixels of the current Coding Unit. Therefore, it is possible to get a good prediction of the value of pixels of the Coding Unit using a predictor block based on these surrounding pixels.
A second coding mode is referred to as INTER mode. According to INTER mode, the predictor block is a block of another image. The idea behind the INTER mode is that successive images in a sequence are generally very similar. The main difference comes typically from a motion between these images due to the scrolling of the camera or due to moving objects in the scene. The predictor block is determined by a vector giving its location in a reference image relatively to the location of the Coding Unit within the current image. This vector is referred to as a motion vector. According to this mode, the encoding of such Coding Unit using this mode comprises motion information comprising the motion vector and the compressed residual.
Focus is made in this document on a third coding mode called Palette mode. According to a former version of the Palette mode, a predictor block is defined for a given Coding Unit as a block of indexes from a palette: for each pixel location in the predictor block, the predictor block contains the index associated with the pixel value in the Palette which is the closest to the value of the pixel having the same location (i.e. colocated) in the Coding Unit. The predictor block has thus the same size as the Coding Unit. A residual representing the difference between the predictor block (in pixel domain) and the Coding Unit is then calculated. The residual has also the same size as the Coding Unit and the predictor block.
Entry indexes in the Palette are also known as “levels”.
In a recent version of the Palette mode under consideration in HEVC SCC, no residual is built and transmitted to the decoder (as in FIG. 7 described below). Only the block of indexes formed using the palette is coded in the bitstream to represent the current block of pixels.
Some pixels may be badly represented by the best palette entry, meaning that the difference between the pixels and the best palette entry is high. It may not be worth using an index for representing such pixels.
The Palette mode thus makes it possible to identify such pixels and to encode their explicit pixel value instead of using an approximating index. Such approach is particularly important where no residual (representing the approximation made by the palette entry) is transmitted. Such pixels whose pixel value is explicitly coded are named “escaped pixels” and no corresponding index is provided in the block of indexes that is associated with a pixel value in the palette. In current implementation of HEVC, the “escaped pixels” are signalled in the block of indexes using an entry index of the palette that is not associated with a pixel value.
In such implementation of the Palette mode, a block of escaped pixel values is built in addition to the block of indexes and to the palette, to store the escaped pixel values.
The predictor block (i.e. the block of indexes), the block of escaped pixel values, and possibly the residual and the palette are encoded to be added to a bitstream representing the encoded current Coding Unit.
To encode the block of indexes for the Palette mode, a plurality of sets of syntax elements are used, each set setting an operation for generating a corresponding group of indexes having successive block positions in the block of indexes.
In the current draft specification of the Screen Content Coding extension of HEVC, a “copy up” prediction and a “left value” prediction are proposed to encode each index of the block of indexes with reference to the index either above in the block matrix, or on its left.
One syntax element, referred to as “Pred mode”, defines the operation or prediction mode selected for the corresponding group of indexes in the block of indexes, i.e. for each current index of the block as long as the Run defined above is not ended. An optional (function of the “Pred mode”) second syntax element, referred to as “Level”, specifies a new index value for the corresponding group of indexes in the “left value” prediction mode only. And a third and last syntax element, referred to as “Run”, specifies on how many successive block positions the operation defined by the “Pred mode” syntax element is applied. In other words, it defines a number of indexes (having successive block positions) in the corresponding group of indexes.
Present embodiments of the invention improve the coding efficiency of the Palette mode.